Integrand size = 13, antiderivative size = 214 \[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=-\frac {1}{2} \sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+\cot (x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )+\frac {1}{2} \sqrt {1+\sqrt {2}} \arctan \left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+\cot (x)}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )-2 \sqrt {1+\cot (x)}-\frac {\log \left (1+\sqrt {2}+\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\cot (x)}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\log \left (1+\sqrt {2}+\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+\cot (x)}\right )}{4 \sqrt {1+\sqrt {2}}} \]
-2*(1+cot(x))^(1/2)-1/4*ln(1+cot(x)+2^(1/2)-(1+cot(x))^(1/2)*(2+2*2^(1/2)) ^(1/2))/(1+2^(1/2))^(1/2)+1/4*ln(1+cot(x)+2^(1/2)+(1+cot(x))^(1/2)*(2+2*2^ (1/2))^(1/2))/(1+2^(1/2))^(1/2)-1/2*arctan((-2*(1+cot(x))^(1/2)+(2+2*2^(1/ 2))^(1/2))/(-2+2*2^(1/2))^(1/2))*(1+2^(1/2))^(1/2)+1/2*arctan((2*(1+cot(x) )^(1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))*(1+2^(1/2))^(1/2)
Result contains complex when optimal does not.
Time = 0.47 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.31 \[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\frac {1}{2} (1-i)^{3/2} \text {arctanh}\left (\frac {\sqrt {1+\cot (x)}}{\sqrt {1-i}}\right )+\frac {1}{2} (1+i)^{3/2} \text {arctanh}\left (\frac {\sqrt {1+\cot (x)}}{\sqrt {1+i}}\right )-2 \sqrt {1+\cot (x)} \]
((1 - I)^(3/2)*ArcTanh[Sqrt[1 + Cot[x]]/Sqrt[1 - I]])/2 + ((1 + I)^(3/2)*A rcTanh[Sqrt[1 + Cot[x]]/Sqrt[1 + I]])/2 - 2*Sqrt[1 + Cot[x]]
Time = 0.49 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.14, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.923, Rules used = {3042, 4026, 25, 3042, 3966, 484, 1407, 1142, 25, 1083, 217, 1103}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(x)}{\sqrt {\cot (x)+1}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan \left (x+\frac {\pi }{2}\right )^2}{\sqrt {1-\tan \left (x+\frac {\pi }{2}\right )}}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle \int -\frac {1}{\sqrt {\cot (x)+1}}dx-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\sqrt {\cot (x)+1}}dx-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\int \frac {1}{\sqrt {1-\tan \left (x+\frac {\pi }{2}\right )}}dx-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 3966 |
\(\displaystyle \int \frac {1}{\sqrt {\cot (x)+1} \left (\cot ^2(x)+1\right )}d\cot (x)-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 484 |
\(\displaystyle 2 \int \frac {1}{(\cot (x)+1)^2-2 (\cot (x)+1)+2}d\sqrt {\cot (x)+1}-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 1407 |
\(\displaystyle 2 \left (\frac {\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-\sqrt {\cot (x)+1}}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\int \frac {\sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle 2 \left (\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}-\frac {1}{2} \int -\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\cot (x)+1}}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}+\frac {1}{2} \int \frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle 2 \left (\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}+\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\cot (x)+1}}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \int \frac {1}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}+\frac {1}{2} \int \frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle 2 \left (\frac {\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\cot (x)+1}}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )} \int \frac {1}{-\cot (x)+2 \left (1-\sqrt {2}\right )-1}d\left (2 \sqrt {\cot (x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\frac {1}{2} \int \frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )} \int \frac {1}{-\cot (x)+2 \left (1-\sqrt {2}\right )-1}d\left (2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle 2 \left (\frac {\frac {1}{2} \int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {\cot (x)+1}}{\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {\cot (x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\frac {1}{2} \int \frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1}d\sqrt {\cot (x)+1}+\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle 2 \left (\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {\cot (x)+1}-\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )-\frac {1}{2} \log \left (\cot (x)-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}+\frac {\sqrt {\frac {1+\sqrt {2}}{\sqrt {2}-1}} \arctan \left (\frac {2 \sqrt {\cot (x)+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )+\frac {1}{2} \log \left (\cot (x)+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {\cot (x)+1}+\sqrt {2}+1\right )}{4 \sqrt {1+\sqrt {2}}}\right )-2 \sqrt {\cot (x)+1}\) |
-2*Sqrt[1 + Cot[x]] + 2*((Sqrt[(1 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(-Sqrt [2*(1 + Sqrt[2])] + 2*Sqrt[1 + Cot[x]])/Sqrt[2*(-1 + Sqrt[2])]] - Log[1 + Sqrt[2] + Cot[x] - Sqrt[2*(1 + Sqrt[2])]*Sqrt[1 + Cot[x]]]/2)/(4*Sqrt[1 + Sqrt[2]]) + (Sqrt[(1 + Sqrt[2])/(-1 + Sqrt[2])]*ArcTan[(Sqrt[2*(1 + Sqrt[2 ])] + 2*Sqrt[1 + Cot[x]])/Sqrt[2*(-1 + Sqrt[2])]] + Log[1 + Sqrt[2] + Cot[ x] + Sqrt[2*(1 + Sqrt[2])]*Sqrt[1 + Cot[x]]]/2)/(4*Sqrt[1 + Sqrt[2]]))
3.1.45.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[1/(Sqrt[(c_) + (d_.)*(x_)]*((a_) + (b_.)*(x_)^2)), x_Symbol] :> Simp[2* d Subst[Int[1/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d}, x]
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/ c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*q*r) Int[(r - x)/(q - r* x + x^2), x], x] + Simp[1/(2*c*q*r) Int[(r + x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d Su bst[Int[(a + x)^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c , d, n}, x] && NeQ[a^2 + b^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*( m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e + f* x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ [m, -1] && !(EqQ[m, 2] && EqQ[a, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(441\) vs. \(2(152)=304\).
Time = 0.04 (sec) , antiderivative size = 442, normalized size of antiderivative = 2.07
method | result | size |
derivativedivides | \(-2 \sqrt {1+\cot \left (x \right )}-\frac {\sqrt {2+2 \sqrt {2}}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}-\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\sqrt {2+2 \sqrt {2}}\, \sqrt {2}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}-\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{8}+\frac {\sqrt {2}\, \left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{4 \sqrt {-2+2 \sqrt {2}}}-\frac {\left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{2 \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}+\frac {\sqrt {2+2 \sqrt {2}}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}+\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{4}-\frac {\sqrt {2+2 \sqrt {2}}\, \sqrt {2}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}+\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{8}+\frac {\sqrt {2}\, \left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{4 \sqrt {-2+2 \sqrt {2}}}-\frac {\left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{2 \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}\) | \(442\) |
default | \(-2 \sqrt {1+\cot \left (x \right )}-\frac {\sqrt {2+2 \sqrt {2}}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}-\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{4}+\frac {\sqrt {2+2 \sqrt {2}}\, \sqrt {2}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}-\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{8}+\frac {\sqrt {2}\, \left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{4 \sqrt {-2+2 \sqrt {2}}}-\frac {\left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{2 \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}+\frac {\sqrt {2+2 \sqrt {2}}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}+\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{4}-\frac {\sqrt {2+2 \sqrt {2}}\, \sqrt {2}\, \ln \left (1+\cot \left (x \right )+\sqrt {2}+\sqrt {1+\cot \left (x \right )}\, \sqrt {2+2 \sqrt {2}}\right )}{8}+\frac {\sqrt {2}\, \left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{4 \sqrt {-2+2 \sqrt {2}}}-\frac {\left (2+2 \sqrt {2}\right ) \arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{2 \sqrt {-2+2 \sqrt {2}}}+\frac {\arctan \left (\frac {2 \sqrt {1+\cot \left (x \right )}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right ) \sqrt {2}}{\sqrt {-2+2 \sqrt {2}}}\) | \(442\) |
-2*(1+cot(x))^(1/2)-1/4*(2+2*2^(1/2))^(1/2)*ln(1+cot(x)+2^(1/2)-(1+cot(x)) ^(1/2)*(2+2*2^(1/2))^(1/2))+1/8*(2+2*2^(1/2))^(1/2)*2^(1/2)*ln(1+cot(x)+2^ (1/2)-(1+cot(x))^(1/2)*(2+2*2^(1/2))^(1/2))+1/4*2^(1/2)*(2+2*2^(1/2))/(-2+ 2*2^(1/2))^(1/2)*arctan((2*(1+cot(x))^(1/2)-(2+2*2^(1/2))^(1/2))/(-2+2*2^( 1/2))^(1/2))-1/2*(2+2*2^(1/2))/(-2+2*2^(1/2))^(1/2)*arctan((2*(1+cot(x))^( 1/2)-(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))+1/(-2+2*2^(1/2))^(1/2)*arc tan((2*(1+cot(x))^(1/2)-(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))*2^(1/2) +1/4*(2+2*2^(1/2))^(1/2)*ln(1+cot(x)+2^(1/2)+(1+cot(x))^(1/2)*(2+2*2^(1/2) )^(1/2))-1/8*(2+2*2^(1/2))^(1/2)*2^(1/2)*ln(1+cot(x)+2^(1/2)+(1+cot(x))^(1 /2)*(2+2*2^(1/2))^(1/2))+1/4*2^(1/2)*(2+2*2^(1/2))/(-2+2*2^(1/2))^(1/2)*ar ctan((2*(1+cot(x))^(1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))-1/2*(2 +2*2^(1/2))/(-2+2*2^(1/2))^(1/2)*arctan((2*(1+cot(x))^(1/2)+(2+2*2^(1/2))^ (1/2))/(-2+2*2^(1/2))^(1/2))+1/(-2+2*2^(1/2))^(1/2)*arctan((2*(1+cot(x))^( 1/2)+(2+2*2^(1/2))^(1/2))/(-2+2*2^(1/2))^(1/2))*2^(1/2)
Result contains complex when optimal does not.
Time = 0.29 (sec) , antiderivative size = 178, normalized size of antiderivative = 0.83 \[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\frac {1}{4} \, \sqrt {2} \sqrt {i - 1} \log \left (-\left (i - 1\right ) \, \sqrt {2} \sqrt {i - 1} + 2 \, \sqrt {\frac {\cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )}}\right ) - \frac {1}{4} \, \sqrt {2} \sqrt {i - 1} \log \left (\left (i - 1\right ) \, \sqrt {2} \sqrt {i - 1} + 2 \, \sqrt {\frac {\cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )}}\right ) + \frac {1}{4} \, \sqrt {2} \sqrt {-i - 1} \log \left (\left (i + 1\right ) \, \sqrt {2} \sqrt {-i - 1} + 2 \, \sqrt {\frac {\cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )}}\right ) - \frac {1}{4} \, \sqrt {2} \sqrt {-i - 1} \log \left (-\left (i + 1\right ) \, \sqrt {2} \sqrt {-i - 1} + 2 \, \sqrt {\frac {\cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )}}\right ) - 2 \, \sqrt {\frac {\cos \left (2 \, x\right ) + \sin \left (2 \, x\right ) + 1}{\sin \left (2 \, x\right )}} \]
1/4*sqrt(2)*sqrt(I - 1)*log(-(I - 1)*sqrt(2)*sqrt(I - 1) + 2*sqrt((cos(2*x ) + sin(2*x) + 1)/sin(2*x))) - 1/4*sqrt(2)*sqrt(I - 1)*log((I - 1)*sqrt(2) *sqrt(I - 1) + 2*sqrt((cos(2*x) + sin(2*x) + 1)/sin(2*x))) + 1/4*sqrt(2)*s qrt(-I - 1)*log((I + 1)*sqrt(2)*sqrt(-I - 1) + 2*sqrt((cos(2*x) + sin(2*x) + 1)/sin(2*x))) - 1/4*sqrt(2)*sqrt(-I - 1)*log(-(I + 1)*sqrt(2)*sqrt(-I - 1) + 2*sqrt((cos(2*x) + sin(2*x) + 1)/sin(2*x))) - 2*sqrt((cos(2*x) + sin (2*x) + 1)/sin(2*x))
\[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\int \frac {\cot ^{2}{\left (x \right )}}{\sqrt {\cot {\left (x \right )} + 1}}\, dx \]
\[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\int { \frac {\cot \left (x\right )^{2}}{\sqrt {\cot \left (x\right ) + 1}} \,d x } \]
\[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\int { \frac {\cot \left (x\right )^{2}}{\sqrt {\cot \left (x\right ) + 1}} \,d x } \]
Time = 12.46 (sec) , antiderivative size = 238, normalized size of antiderivative = 1.11 \[ \int \frac {\cot ^2(x)}{\sqrt {1+\cot (x)}} \, dx=\mathrm {atanh}\left (\frac {16\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {\mathrm {cot}\left (x\right )+1}}{128\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}-8}-\frac {16\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {\mathrm {cot}\left (x\right )+1}}{128\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}-8}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}+2\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\right )-\mathrm {atanh}\left (\frac {16\,\sqrt {2}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {\mathrm {cot}\left (x\right )+1}}{128\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}+8}+\frac {16\,\sqrt {2}\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {\mathrm {cot}\left (x\right )+1}}{128\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}+8}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{16}-\frac {1}{16}}-2\,\sqrt {\frac {\sqrt {2}}{16}-\frac {1}{16}}\right )-2\,\sqrt {\mathrm {cot}\left (x\right )+1} \]
atanh((16*2^(1/2)*(- 2^(1/2)/16 - 1/16)^(1/2)*(cot(x) + 1)^(1/2))/(128*(2^ (1/2)/16 - 1/16)^(1/2)*(- 2^(1/2)/16 - 1/16)^(1/2) - 8) - (16*2^(1/2)*(2^( 1/2)/16 - 1/16)^(1/2)*(cot(x) + 1)^(1/2))/(128*(2^(1/2)/16 - 1/16)^(1/2)*( - 2^(1/2)/16 - 1/16)^(1/2) - 8))*(2*(- 2^(1/2)/16 - 1/16)^(1/2) + 2*(2^(1/ 2)/16 - 1/16)^(1/2)) - atanh((16*2^(1/2)*(- 2^(1/2)/16 - 1/16)^(1/2)*(cot( x) + 1)^(1/2))/(128*(2^(1/2)/16 - 1/16)^(1/2)*(- 2^(1/2)/16 - 1/16)^(1/2) + 8) + (16*2^(1/2)*(2^(1/2)/16 - 1/16)^(1/2)*(cot(x) + 1)^(1/2))/(128*(2^( 1/2)/16 - 1/16)^(1/2)*(- 2^(1/2)/16 - 1/16)^(1/2) + 8))*(2*(- 2^(1/2)/16 - 1/16)^(1/2) - 2*(2^(1/2)/16 - 1/16)^(1/2)) - 2*(cot(x) + 1)^(1/2)